﻿using ORMDemo.Core.Mapping;
using ORMDemo.Core.Validate;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ORMDemo.Model
{
    public class User : BaseModel
    {
        [ValidateRequired]//设置不能为空
        public string Name { get; set; }
        [ValidateRequired]//设置不能为空
        public string Account { get; set; }
        [ValidateRequired]//设置不能为空
        public string Password { get; set; }
        [ValidateEmailVerify] //设置email验证
        public string Email { get; set; }
        [ValidateTelVerify]//设置tel验证
        public string Phone { get; set; }
        public int CompanyId { get; set; }
        public string CompanyName { get; set; }
        [MappingColumn("state")]//设置真实字段名
        [ValidateIntVerify(1, 3, 5, 7)] //设置数字数组验证
        public int statues { get; set; }
        public int UserType { get; set; }
        public DateTime LastLoginTime { get; set; }
        public DateTime CreateTime { get; set; }
    }
}
